home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
mint
/
lib
/
mntlib44.zoo
/
mntlib
/
pause.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-07-06
|
659b
|
43 lines
/* public domain pause(), by ers */
#include <mintbind.h>
#include <signal.h>
#include <errno.h>
#include <unistd.h>
extern int __mint;
int
pause()
{
if (__mint)
(void)Pause();
/* do nothing for TOS */
errno = EINTR;
return -1;
}
/* Public domain sigpause() - AGK */
void
sigpause(mask)
long mask;
{
long oldmask;
if (__mint == 0) {
/* for TOS, we just toggle the signal mask -- maybe
* there's a pending signal that we can receive.
*/
oldmask = sigsetmask(mask);
sigsetmask(oldmask);
}
else if (__mint <= 94) {
oldmask = Psigsetmask(mask);
(void)Pause();
(void)Psigsetmask(oldmask);
}
else
(void)Psigpause(mask);
}